import request from '@/utils/request'

export const FindBrandPage = (pageNum, pageSize) => {
  return request({
    url: `/admin/product/brand/page/${pageNum}/${pageSize}`,
    method: 'get',
  })
}
export const GetAllBrand = () => {
  return request({
    url: `/admin/product/brand/all`,
    method: 'get',
  })
}
export const SaveBrand = data => {
  return request({
    url: `/admin/product/brand/save`,
    method: 'post',
    data,
  })
}

export const UpdateBrand = data => {
  return request({
    url: `/admin/product/brand/update`,
    method: 'PUT',
    data,
  })
}

export const GetBrandById = id => {
  return request({
    url: `/admin/product/brand/${id}`,
    method: 'GET',
  })
}

export const DeleteBrandById = id => {
  return request({
    url: `/admin/product/brand/${id}`,
    method: 'DELETE',
  })
}
